#include "stdint.h"
#include "stddef.h"
#include "stdio.h"
#include "reset.h"
#include "los_task.h"
#include "los_compiler.h"
#include "cmsis_os2.h"
#include "ohos_init.h"
#include "ohos_types.h"

void reset_entry()
{
    printf("----- reset test -----\n");
    RebootDevice(0);
}

void reset_task()
{
    UINT32 uwRet = -1;
    UINT32 taskID = 0;
    TSK_INIT_PARAM_S stTask = {0};
    stTask.pfnTaskEntry = (TSK_ENTRY_FUNC)reset_entry;
    stTask.uwStackSize = 0x1000;
    stTask.pcName = "reset task";
    stTask.usTaskPrio = 10;
    uwRet = LOS_TaskCreate(&taskID, &stTask);
    if (uwRet != LOS_OK) {
        printf("Task fs create failed\n");
    }
}